package com.cxso.example.domain.wlpt.waybill;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

@Setter
@Getter
@Accessors(chain = true)
@Schema(description = "运单货物明细")
public class ApiWaybillGoodsDomain {

    @Schema(description = "货物类型")
    @NotBlank(message = "货物类型不能为空！")
    private String goodsType;

    @Schema(description = "货值")
    @NotNull(message = "货值不能为空！")
    @DecimalMin(value = "0.01", message = "货物单价必需要大于0")
    private BigDecimal goodsPrice;

    @Schema(description = "货物名称")
    @NotBlank(message = "货物名称为空！")
    private String goodsName;

    @Schema(description = "发货重量")
    @NotNull(message = "发货重量不能为空！")
    @DecimalMin(value = "0.000001", message = "发货重量必需要大于0")
    private BigDecimal sendWeight;

    @Schema(description = "收货重量")
    @DecimalMin(value = "0.000001", message = "收货重量需要大于0")
    private BigDecimal deliveryWeight;

    @Schema(description = "货物数量,按方必填")
    @DecimalMin(value = "0", message = "货物数量必需要大于或等于0")
    private BigDecimal goodsNumber;

}
